package br.com.naybee.framework.client.componente.gwt.web;

import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.OptionElement;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.ui.ComplexPanel;
import com.google.gwt.user.client.ui.Widget;

public class Option extends ComplexPanel {

	private OptionElement optionElement = DOM.createOption().cast();

	public Option() {
		setElement(optionElement);
	}

	public void add(Widget w) {
		Element element = this.optionElement;
		this.add(w, element);
	}

	public Option(OptionElement optionElement) {
		setElement(optionElement);
	}

	public void setText(String text) {
		optionElement.setInnerText(text);
	}

	public String getText() {
		return optionElement.getInnerText();
	}

	public void setClassId(String classId) {
		optionElement.setId(classId);
	}

	public String getClassId() {
		return optionElement.getId();
	}

	public void setClassName(String className) {
		optionElement.setClassName(className);
	}

	public String getClassName() {
		return optionElement.getClassName();
	}

	public void setValue(String value) {
		optionElement.setValue(value);
	}

	public String getValue() {
		return optionElement.getValue();
	}
}
